﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;

namespace Logic
{
    public class AppInfoLogic
    {
        public static List<TB_App_Info> GetAll()
        {
            return DB.Context.From<TB_App_Info>()
                .ToList();
                
        }

        public static TB_App_Info GetModelById(int appId)
        {
            return DB.Context.From<TB_App_Info>()
                .Where(d => d.AppId == appId)
                .First();
        }

        public static TB_App_Info GetModelByName(string appName)
        {
            return DB.Context.From<TB_App_Info>()
                .Where(d => d.AppName == appName)
                .First();
        }

        
    }
}
